package net.admin.db.popup;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

public class PopupDAO {
	
	Connection con = null;
	PreparedStatement pstmt = null;
	ResultSet rs = null;
	
	public PopupDAO(){
		try{
			Context initCtx = new InitialContext();
			Context envCtx = (Context)initCtx.lookup("java:comp/env");
			DataSource ds = (DataSource)envCtx.lookup("jdbc/OracleDB");
			
			con = ds.getConnection();
		}catch(Exception ex){
			ex.printStackTrace();
		}
	}
	
	public void writePopup(PopupBean article) throws Exception{
		
	}
	
	public int getPopupCount(PopupBean article) throws Exception{
		
		return 0;
	}
	
	
	
}